<html>

	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<link rel="stylesheet" type="text/css" href="../css/aui-win.css" />
	<style type="text/css">
		.aui-tab-nav{
			background-color: #00adF3;
		}
		.aui-tab-nav li{
			color: #fff;
		}
		.aui-tab-nav li.active {
			color: #EEFFC6;
			border-bottom: 0px;
		}
	</style>
	<script type="text/javascript" src="../script/api.js"></script>

	<body>
		
		<div class="aui-tab" id="header">
			<ul class="aui-tab-nav" id="demo1">
				<li class="active" data-index = "0">金融招聘</li>
				<li data-index = "1">招考资讯</li>
				<li data-index = "2">行业干货</li>
				<li data-index = "3">招考培训</li>
			</ul>
		</div>
		<script type="text/javascript">
			apiready = function() {
				api.parseTapmode();
				var demo1 = $api.domAll("#demo1 li");
				for (var i in demo1) {
					$api.addEvt(demo1[i], 'click', function() {
						$api.removeCls($api.dom("#demo1 li.active"), 'active');
						$api.addCls(this, 'active');
						var index = this.getAttribute('data-index');
						api.setFrameGroupIndex({
							name: 'top_tab',
							index: index,
							scroll: true
						});
					});
				}

				var headerPos = $api.offset(header);
				var body_h = $api.offset($api.dom('body')).h;
				var system = api.systemType;
				if(system=="ios"){
					var h = 65+headerPos.h;
				}else{
					var h = 45+headerPos.h;
				}
				api.openFrameGroup({
					name: 'top_tab',
					scrollEnabled: true,
					rect: {
						x: 0,
						y: h,
						w: 'auto',
						h: body_h - headerPos.h
					},
					index: 0,
					preload:0,
					frames: [{
						name: 'news1',
						url: 'news-con.html',
						pageParam: {
							id:1
						},
						bounces: false
					}, {
						name: 'news2',
						url: 'news-con.html',
						pageParam: {
							id:2
						},
						bounces: false
					}, {
						name: 'news3',
						url: 'news-con.html',
						pageParam: {
							id:3
						},
						bounces: false
					}, {
						name: 'news4',
						url: 'news-con.html',
						pageParam: {
							id:4
						},
						bounces: false
					}]
				}, function(ret, err) {
					var index = ret.index;
					$api.removeCls($api.dom("#demo1 li.active"), 'active');
					$api.addCls(demo1[index], 'active');
//					if (index == 0) {
//						
//					} else if (index == 1) {
//						
//					} else if (index == 2) {
//						
//					}
				});
			}
		</script>
	</body>

</html>